#include<cstdio>
int bx=0,by=0,mx=0,my=0;
int mnextx[9];
int mnexty[9];
int demx[8]={+2,+2,-2,-2,+1,+1,-1,-1};
int demy[8]={+1,-1,+1,-1,+2,-2,+2,-2};
long long ans=0;
void f(int x,int y){
	if(x==bx&&y==by){
		ans++;
		return;
	}
	if(x+1<=bx)	{
			int ismflag=0;
			if(x+1<=mx+2&&x+1>=mx-2&&y<=my+2&&y>=my-2){
				for(int i=0;i<9;i++){
					if(mnextx[i]==x+1&&mnexty[i]==y){
						ismflag=1;
					}
				}
			} 
			if(!ismflag){
				f(x+1,y);
			}	
	}
	if(y+1<=by) {
		    int ismflag=0;
		    if(x<=mx+2&&x>=mx-2&&y+1<=my+2&&y+1>=my-2){
				for(int i=0;i<9;i++){
					if(mnextx[i]==x&&mnexty[i]==y+1){
						ismflag=1;
					}
				}
			}
			if(!ismflag){
				f(x,y+1);
			}
	}
}
void m(int mx,int my){
	for(int i=0;i<8;i++){
		mnextx[i]=demx[i]+mx;
		mnexty[i]=demy[i]+my;
	}
	mnextx[8]=mx;
	mnexty[8]=my;
}
int main(){
	scanf("%d%d%d%d",&bx,&by,&mx,&my);
	m(mx,my);
	f(0,0);
	printf("%lld",ans); 
	return 0;
}
